$(function () {
    var $document = $(document);
    // 展开筛选条件
    $document.on("click", ".filter-action-more", function () {
        var $this = $(this);
        var $thisSection = $this.parents(".filter-section");
        var openClassName = "filter-section-open";
        if($thisSection.hasClass(openClassName)){
            $thisSection.removeClass(openClassName);
            $this.html("更多<i></i>");
        } else {
            $thisSection.addClass(openClassName);
            $this.html("收起<i></i>");
        }
    });

    // 展开所有筛选
    $document.on("click", ".filter-all-close", function () {
        var $this = $(this);
        var $filter = $this.parents(".tf-box");
        var closeClassName = "tf-box-close";
        if($filter.hasClass(closeClassName)){
            $filter.removeClass(closeClassName);
            $this.html("收起<i></i>");
        } else {
            $filter.addClass(closeClassName);
            $this.html("更多<i></i>");
        }
    });

});